package ankang.day140104;

public class Test16 {
    public static void main(String[] args) {
        //print(8);
        String result=createVerifyCode(4);
        System.out.println(result);
    }

    //产生四个随机字母返回
    static String createVerifyCode(int count){
        //用循环产生count个随机字母，拼接为String字符串返回
        String rs="";
        for (int i = 1; i <= count; i++) {
            char b=(char)('A'+  (int)( Math.random()*26 ));
            rs=rs+b;
        }
        return rs;
    }





    static void print(int row) {
        for (int i = 1; i <= row; i++) {
            for (int j = 1; j <= i; j++) {//	\t 四个空格
                System.out.print(j + "*" + i + "=" + (j * i) + "\t");
            }
            System.out.println();
        }
    }
}
